package patternmining.util;

import java.util.Collection;
import java.util.Iterator;
import java.util.LinkedList;


public class CollectionOperations<T>{
  
    public Collection<T> difference(Collection<T> base, T subtract){
        Iterator<T> it = base.iterator();
        Collection<T> difference = new LinkedList<T>();
        T element;
        while(it.hasNext()){
            element = it.next();
            if (element != subtract){
                difference.add(element);
            }
        }
        return difference;
    }
    
}